﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title>学生惠后台管理系统</title>
    <link rel="stylesheet" href="/App/Admin/public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/jquery.datetimepicker.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/style.css"/>
</head>
<body>
<div class="mainBody">
     <include file="Public:left"/>
    <div class="main">
         <include file="Public:top"/>
        <div class="subNav">
            <span class="text"><i class="iconFont">&#xe600;</i>商家管理</span>
        </div>

        <div class="indexBox">
            <div class="con-det">
                <div class="row">
                    <div class="col-md-12">
                       <form action="{:U('shopMange/index')}" method="post">
                            <table class="formTable">
                                <tbody><tr>
                                    <td class="name noBor">关键字</td>
                                    <td class="noBor">
                                        <input type="text"  name="sh_q"  value="{$shArray.sh_q}"  class="inp form-control" placeholder="商铺号/商店名">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="name">开店时间</td>
                                    <td>
                                        <input type="text" name="from_time"  value="{$shArray['from_time']?$shArray['from_time']:''}"  class="inp time form-control datetimepicker">
                                        <input type="text"  name="to_time"  value="{$shArray['to_time']?$shArray['to_time']:''}" class="inp time form-control datetimepicker">
                                    </td>
                                </tr>
                                
                               <!-- ///////////////////////-->
                                      <span class="name">商家类别</span>
					
					
					
                     <div class="col-md-3 col-sm-10 col-xs-3">
                        <select id="select_id1" class="inpTextOne form-control" name="select_name1">
                            <option selected="selected" value="">请选择</option>
							
							  <foreach name='list1'  item='item'>
									<option  value="{$item['id']}">{$item['class_name']}</option>
							  </foreach>
					     </select>
                    </div>
					
					
                    <div class="col-md-3 col-sm-10 col-xs-3">
                        <select class="inpTextOne form-control" id="select_id2" name="select_name2">
                           <option selected="selected" value="">请选择</option>
                        </select>
                    </div>
					
					
                    <div class="col-md-3 col-sm-10 col-xs-3">
                    <select class="inpTextOne form-control"  id="select_id3" name="select_name3" >
                           <option selected="selected" value="">请选择</option>
                    </select>
                </div>
				
				
				
                    <div class="col-md-3 col-sm-10 col-xs-3">
                        <select class="inpTextOne form-control"  id="select_id4" name="select_name4">
                           <option selected="selected" value="">请选择</option>
                        </select>
                    </div>
					
				
                               <!--////////////////////////-->
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                <tr>
                                    <td class="name">区域</td>
                                    <td>
                                       
                                     
                                         <select  id="select_id5" class="inp address form-control" name="select_name5">
                                            <option selected="selected" value=''>省</option>
                                            <foreach name='listAddress'  item='item'>
                                            <option value="{$item['id']}" >{$item['name']}</option>
                                            </foreach>
                                         </select>
                                            
                                            <select id="select_id6"  class="inp address form-control" name="select_name6">
                                                <option selected="selected" value="">市</option>
                                             </select>
                                            
                                           <select  id="select_id7" class="inp address form-control" name="select_name7">
                                                <option selected="selected" value="">大学</option>
                                           </select>
                                            
                                            
                                    </td>
                                </tr>
                                <tr>
                                    <td class="name">商家状态</td>
                                    <td>
                                    
                                         <select class="inp form-control" name="buss_status">
                                            <option selected="selected"  value="">请选择</option>
                                              <foreach name='buss_status_arr'  item='item'>
                                              <option value="{$key}"  <if condition="$key eq $shArray['buss_status']"> selected </if> >{$item}</option>
                                              </foreach>
                                         </select>
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td class="name">商家类别</td>
                                    <td>
                                           <select class="inp form-control" name="shop_type">
                                            <option selected="selected"  value="">请选择</option>
                                              <foreach name='shop_type'  item='item'>
                                              <option value="{$key}" <if condition="$key eq $shArray['shop_type']"> selected </if> >{$item}</option>
                                              </foreach>
                                         </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="name"></td>
                                    <td>
                                        <button class="btn btn-primary blue" type="submit">查询</button>
                                    </td>
                                </tr>
                                </tbody></table>
                        </form>
                    </div>
                </div>

                <div class="mt40 listBox">
                    <div class="listScroll">
                        <table class="table table-striped">
                            <tr>
                                <th>商铺号</th>
                                <th>商铺名</th>
                                <th>商家类别</th>
                                <th>店主姓名</th>
                                <th>手机号</th>
                                <th>开店时间</th>
                                <th>身份证号</th>
                                <th>银行卡</th>
                                <th>所在省</th>
                                <th>所在市</th>
                                <th>大学</th>
                                <th>扣点</th>
                                <th>状态</th>
                                <th>商品管理</th>
                                <th>国际品牌</th>
                                <th>操作</th>
                            </tr>
                       <foreach name="list" item="item" >
                        <tr>
                        <td>{$item.id}</td>
                        <td>{$item.shop_name}</td>
                        <td>{$item.class_name}</td>
                        <td>{$item.keeper}</td>
                        <td>{$item.phone}</td>
                        <td>{$item.add_time|date='Y-m-d',###}</td>
                        <td>{$item.idcard}</td>
                        <td>{$item.bankcard} </td>
                        <td>{$item.provin}</td>
                        <td>{$item.city}</td>
                        <td>{$item.school}</td>
                        <td>{$item.point}</td>
			
                        
			 <if condition="$item.buss_status eq 1 ">
                         <td>待审核</td>
			 <elseif condition="$item.buss_status eq 2 "/>
			 <td>未显示</td>
                          <elseif condition="$item.buss_status eq 3 "/>
			 <td>显示中</td>
                          <else/>
		         <td>禁用</td>
			 </if>
			
                         <td><a href="{:U('Product/index','&shop_mid='.$item['mid'])}" class="btn btn-default btn-xs" >查看</a></td>
                         
                         
                         <if condition="$item.shop_type eq 1">
                             
                         <td>
                         <if condition="$item.is_set eq 2 ">
			 <a href="{:U('shopMange/is_set','id='.$item['id'].'&is_set='.$item['is_set'])}" title="取消" onClick="javascript:if(confirm('取消为国际品牌 ？')){return true;}else{return false;}">取消</a>
			 <else/>
			 <a href="{:U('shopMange/is_set','id='.$item['id'].'&is_set='.$item['is_set'])}" title="设置" onClick="javascript:if(confirm('确定设置为国际品牌？')){return true;}else{return false;}">设置</a>
			 </if>
                         </td>
                         
                         <else/>
                            <td>  <a href="javascript:void(0);" title="设置" onClick="javascript:if(confirm('只有A类商家可设置为国际品牌')){return true;}else{return false;}">无此功能</a>   </td>
                         </if>
                                
                                
                                
                                <td>
                                    <a href="{:U('shopMange/editPoint','&id='.$item['id'])}" class="btn btn-default btn-xs">详情</a>
                                    <a href="{:U('shopMange/editDetail','&id='.$item['id'])}" class="btn btn-default btn-xs">编辑</a>
                                    
                                   
                                   <if condition="$item.buss_status eq 1 ">
                        <!-- 待审核-->
                                 <a href="javascript:void(0);" title="未审核"  class="btn btn-default btn-xs" onClick="javascript:if(confirm('此店铺尚未审核')){return true;}else{return false;}">启用</a>
			 <elseif condition="$item.buss_status eq 2 "/>
			<!-- 未显示-->
                                <a href="javascript:void(0);" title="未显示" class="btn btn-default btn-xs" onClick="javascript:if(confirm('此店铺没有剩余红包')){return true;}else{return false;}">启用</a>
                          <elseif condition="$item.buss_status eq 3 "/>
		        <!-- 显示中-->	
                                <a href="{:U('shopMange/busstatus','id='.$item['id'].'&buss_status='.$item['buss_status'])}" class="btn btn-default btn-xs"  title="禁用" onClick="javascript:if(confirm('确定禁用此店铺？')){return true;}else{return false;}">禁用</a>
                          <else/>
		         <!-- 禁用-->	
                                <a href="{:U('shopMange/busstatus','id='.$item['id'].'&buss_status='.$item['buss_status'])}" class="btn btn-default btn-xs"  title="启用" onClick="javascript:if(confirm('确定启用此店铺？')){return true;}else{return false;}">启用</a>
			 </if>
                           
                                </td>
                            </tr>
                              </foreach>
                        </table>
                    </div>
                    <nav aria-label="Page navigation">
                        <ul class="pagination fr">
                            {$page}
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/time.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/public.js"></script>


<script>
$("#select_id1").change(function(){
var checkValueOne=$("#select_id1").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_class')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id2").text(' ');
               $("#select_id2").append(data);
            
        });
});
</script>


<script>
$("#select_id2").change(function(){
var checkValueOne=$("#select_id2").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_class')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id3").text(' ');
               $("#select_id3").append(data);
            
        });
});
</script>


<script>
$("#select_id3").change(function(){
var checkValueOne=$("#select_id3").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_class')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id4").text(' ');
               $("#select_id4").append(data);
            
        });
});
</script>



<script>
$("#select_id5").change(function(){
var checkValueOne=$("#select_id5").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_address')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id6").text(' ');
               $("#select_id6").append(data);
            
        });
});
</script>


<script>
$("#select_id6").change(function(){
var checkValueOne=$("#select_id6").val(); //获取Select选择的Value
/*alert(checkValueOne);die();*/
 $.post('{:U('ShopMange/select_address')}',{checkValueOne:checkValueOne},function(data){
               $("#select_id7").text(' ');
               $("#select_id7").append(data);
            
        });
});
</script>



</body>
</html>








